package insertionSort;


/**
 * The {@link ReceivedInput} class is a {@link InputProcessorState} which represents
 * that a state has recieved an input.
 */
public class ReceivedInput<T extends Comparable<? super T>> implements InputProcessorState<T>{

	private final T input;
	/**
	 * Returns the current input of the state.
	 * @return the current input of the state.
	 */
	public T getInput() {
		return input;
	}
	/**
	 * Constructor of {@link ReceivedInput}.
	 * @param input is the current input of the state.
	 */
	public ReceivedInput(final T input) {
		this.input = input;
	}
	@Override
	public void accept(final InputProcessorStateVisitor<T> visitor) {
		visitor.visit(this);
	}
}
